import common from './common'
import paths from './paths'

const systemManageService = {};

(function (service) {
  // 组织相关服务
  // 保存组织列表
  service.organizationManageSave = function (queryParams) {
    return common.post(paths.organizationUserManage.organization.save, null, queryParams)
  }

  /**
   * 保存用户信息
   * @param queryParams
   * @returns {*}
   */
  service.userSave = function (queryParams) {
    return common.get(paths.organizationUserManage.user.save, queryParams)
  }
  /**
   * 更新用户信息
   * @param queryParams
   * @returns {*}
   */
  service.userUpdate = function (queryParams) {
    return common.get(paths.organizationUserManage.user.update, queryParams)
  }
  /**
   * 获取用户密钥信息
   * @param queryParams
   * @returns {*}
   */
  service.userGet = function (queryParams) {
    return common.get(paths.organizationUserManage.user.get, queryParams)
  }
  /**
   * 复制密钥信息
   * @param queryParams
   * @returns {*}
   */
  service.userInfoCopy = function (queryParams) {
    return common.post(paths.organizationUserManage.user.copy, queryParams, null)
  }
  /**
   * 锁定用户
   * @param queryParams
   * @returns {*}
   */
  service.lockUser = function (queryParams) {
    return common.post(paths.organizationUserManage.user.lock, queryParams, null)
  }
  /**
   * 重置用户密钥
   * @param queryParams
   * @returns {*}
   */
  service.resetUserAppSecret = function (queryParams) {
    return common.post(paths.organizationUserManage.user.reset, queryParams, null)
  }
})(systemManageService)

export default systemManageService;
